<template>
  <div>
    <div class="list-btn">
      用户姓名:<Input v-model.trim="params.realname" placeholder="请输入姓名" style="width: 200px" clearable @keyup.enter.native="getList(url)" />
    </div>
    <div class="list-btn">
      手机号:<Input v-model.trim="params.phone" placeholder="请输入手机号" style="width: 200px" clearable @keyup.enter.native="getList(url)" />
    </div>
    <div class="list-btn">
      订单号:<Input v-model.trim="params.nid" placeholder="请输入订单号" style="width: 200px" clearable @keyup.enter.native="getList(url)" />
    </div>
    <div class="list-btn">
      结清状态:
      <Select clearable style="width:200px" v-model="params.settleStatus" placeholder="全部">
        <Option value=" ">全部</Option>
        <Option :value=0>未结清</Option>
        <Option :value=1>已结清</Option>
      </Select>
    </div>
    <div class="list-btn">
      催收人员:
      <Select clearable style="width:200px" v-model="params.collectionUserId" placeholder="全部">
        <Option value=" ">全部</Option>
        <Option v-for="(item,index) in sysUserList" :value=item.id :key="index">{{item.userName}}</Option>
      </Select>
    </div>
    <div class="list-btn">
      催收状态:
      <Select clearable style="width:200px" v-model="params.allotStatus" placeholder="全部">
        <Option value=" ">全部</Option>
        <Option :value=0>催收中</Option>
        <Option :value=1>催收已回收</Option>
      </Select>
    </div>
    <div class="list-btn">
      逾期天数(天):
      <Input  v-model.trim="params.deptBeginDays" placeholder="请输入开始天数" style="width: 100px" clearable @keyup.enter.native="getList(url)" />
      —
      <Input  v-model.trim="params.deptEndDays" placeholder="请输入结束天数" style="width: 100px" clearable @keyup.enter.native="getList(url)" />
      <!--<Select clearable style="width:200px" v-model="params.daysStr" placeholder="全部">
        <Option value=" ">全部</Option>
        <Option v-for="(item,index) in daysStrList" :value=item.value :key="index">{{item.name}}</Option>
      </Select>-->
    </div>
    <div class="list-btn">
      合同结束时间:<DatePicker type="date" @on-change="startTime"  placeholder="选择开始时间" style="width: 200px" ></DatePicker>
      ～<DatePicker type="date" @on-change="endTime"  placeholder="选择结束时间" style="width: 200px"  ></DatePicker>
    </div>
    <div class="list-btn">
      还款时间:<DatePicker type="date" @on-change="clearBeginTime"  placeholder="选择开始时间" style="width: 200px" ></DatePicker>
      ～<DatePicker type="date" @on-change="clearEndTime"  placeholder="选择结束时间" style="width: 200px"  ></DatePicker>
    </div>

    <div class="list-btn">
      <Button type="primary" @click="getList(url,'refresh')">搜索</Button>
    </div>
<!--
    <div class="list-btn">
      <Button type="primary" @click="reback(ids)">强制收回(批量)</Button>
    </div>-->
   <!-- <div class="list-btn">
      <Button type="primary" @click="test(1)">逾期费用计算</Button>
    </div>
    <div class="list-btn">
      <Button type="primary" @click="test(2)">检查分配订单</Button>
    </div>
    <div class="list-btn">
      <Button type="primary" @click="test(3)">生成分配订单</Button>
    </div>-->
    <page-list :listTitle="listTitle" :list="list" :loading="loading" @selectItem="ids = $event;"></page-list>
    <page-button  :current="params.pageCurrent" :total="total" @changePageNum="params.pageCurrent = $event; getList(url)" @changePageSize="params.pageLimit = $event; getList(url)"></page-button>

    <Modal
      v-model="showModal.isLinkShow"
      title="用户信息"
      width="600px"
      :footer-hide="true"
      :loading="loading">
      <Tabs  v-model="linkTab" @on-click="change">
        <TabPane label="基本信息" name="name1">
          <Form :model="basicInfo" :label-width="90">
            <FormItem label="姓名" class="width30">
              <Input v-model="basicInfo.realname" disabled></Input>
            </FormItem>
            <FormItem label="手机号" class="width30">
              <Input v-model="basicInfo.phone" disabled></Input>
            </FormItem>
            <FormItem label="身份证号" style="display: block;width:80%;margin-bottom: 5px">
              <Input v-model="icard" disabled></Input>
            </FormItem>
          </Form>
          <Form :model="otherInfo" :label-width="90">
            <FormItem label="身份证地址"  style="display: block;width:80%;margin-bottom: 5px">
              <Input v-model="otherInfo.area1" disabled></Input>
            </FormItem>
            <FormItem label="居住地区"  style="display: block;width:80%;margin-bottom: 5px">
              <Input v-model="otherInfo.area" disabled></Input>
            </FormItem>
            <FormItem label="详细地址"  style="display: block;width:80%;margin-bottom: 5px">
              <Input v-model="otherInfo.address" disabled></Input>
            </FormItem>
            <FormItem label="单位名称"  style="display: block;width:80%;margin-bottom: 5px">
              <Input v-model="otherInfo.companyName" disabled></Input>
            </FormItem>
            <FormItem label="工作性质"  style="display: block;width:80%;margin-bottom: 5px">
              <Input v-model="otherInfo.workType" disabled></Input>
            </FormItem>
            <FormItem label="	单位地区"  style="display: block;width:80%;margin-bottom: 5px">
              <Input v-model="otherInfo.companyArea" disabled></Input>
            </FormItem>
            <FormItem label="单位详细地址"  style="display: block;width:80%;margin-bottom: 5px">
              <Input v-model="otherInfo.companyAddress" disabled></Input>
            </FormItem>
            <!--<FormItem label="月薪" class="width30">
              <Input v-model="otherInfo.monthly" disabled></Input>
            </FormItem>-->
          </Form>
          <Form :model="linkman" :label-width="90">
            <h3 class="title">常用联系人</h3>
            <FormItem label="姓名" class="width30">
              <Input v-model="linkman.contractName" disabled></Input>
            </FormItem>
            <FormItem label="姓名" class="width30">
              <Input v-model="linkman.contractNameOne" disabled></Input>
            </FormItem>
            <FormItem label="关系" class="width30">
              <Input v-model="linkman.relation" disabled></Input>
            </FormItem>
            <FormItem label="关系" class="width30">
              <Input v-model="linkman.relationOne" disabled></Input>
            </FormItem>
            <FormItem label="手机号" class="width30">
              <Input v-model="linkman.contractMobile" disabled></Input>
            </FormItem>
            <FormItem label="手机号" class="width30">
              <Input v-model="linkman.contractMobileOne" disabled></Input>
            </FormItem>
          </Form>
          <Form :model="bankCard" :label-width="90" class="form">
            <h3 class="title">绑定银行卡</h3>
            <FormItem label="银行卡名称"  style="display: inline-block;width:45%;margin-bottom: 5px">
              <Input v-model="bankCard.bankName" disabled></Input>
            </FormItem>
            <FormItem label="银行卡卡号" style="display: inline-block;width:45%;margin-bottom: 5px">
              <Input v-model="bankCard.bankNum" disabled></Input>
            </FormItem>
            <FormItem label="预留手机号" style="display: inline-block;width:45%;margin-bottom: 5px">
              <Input v-model="bankCard.bankPhone" disabled></Input>
            </FormItem>
            <FormItem label="完成绑定时间" style="display: inline-block;width:45%;margin-bottom: 5px">
              <Input v-model="bankCard.createTime" disabled></Input>
            </FormItem>
          </Form>
        </TabPane>
        <TabPane label="淘宝收货地址" name="name4">
          <Table border :columns="taobaoTitle" :data="taobaoData"></Table>
          <!--<Page style="margin-top: 10px;text-align: right;" :current="link.pageCurrent" :total="linkTotal" simple  @on-change="changeLinkNum"/>-->
        </TabPane>
        <TabPane label="亲情号" name="name5">
          <Table border :columns="familyTitle" :data="familyData"></Table>
          <!--<Page style="margin-top: 10px;text-align: right;" :current="link.pageCurrent" :total="linkTotal" simple  @on-change="changeLinkNum"/>-->
        </TabPane>
        <TabPane label="通讯录" name="name2">
          <Table border :columns="linkTitle" :data="linkData"></Table>
          <Page style="margin-top: 10px;text-align: right;" :current="link.pageCurrent" :total="linkTotal" simple  @on-change="changeLinkNum"/>
        </TabPane>
        <TabPane label="通话记录" name="name3">
          <Table border :columns="recordTitle" :data="recordData"></Table>
          <Page style="margin-top: 10px;text-align: right;" :current="record.pageCurrent" :total="recordTotal" simple  @on-change="changeRecordNum"/>

        </TabPane>
      </Tabs>

      <div style="text-align: right;margin-top: 20px">
        <Button @click="showModal.isLinkShow = false;" type="primary">关闭</Button>
        <!--<Button type="primary" @click.prevent="UpdateData">确定</Button>-->
      </div>
    </Modal>
    <Modal
      v-model="showModal.isShow"
      title="查看催收记录"
      :footer-hide="true"
      :loading="loading"
      width="600px">
      <Form style="">
        <Table height="400" :columns="CollectionLogTitle" border :data="CollectionLog"></Table>
      </Form>
      <div style="text-align: right;margin-top: 20px">
        <Button @click="showModal.isShow = false;">关闭</Button>
        <!--<Button type="primary" @click.prevent="UpdateData">确定</Button>-->
      </div>
    </Modal>
    <Modal
      v-model="showModal.rebackShow"
      title="客户反馈"
      :footer-hide="true"
      :loading="loading"
      width="600px">
      <Form style="">
        <Table height="400" :columns="rebackTitle" border :data="rebackData"></Table>
      </Form>
      <div style="text-align: right;margin-top: 20px">
        <Button @click="showModal.rebackShow = false;">关闭</Button>
        <!--<Button type="primary" @click.prevent="UpdateData">确定</Button>-->
      </div>
    </Modal>
    <Modal
      v-model="showModal.isOrderShow"
      title="订单流程"
      :footer-hide="true"
      :loading="loading"
      width="600px">
      <Form style="">
        <Table height="400" :columns="isOrderTitle" border :data="isOrderData"></Table>
      </Form>
      <div style="text-align: right;margin-top: 20px">
        <Button @click="showModal.isOrderShow = false;">关闭</Button>
        <!--<Button type="primary" @click.prevent="UpdateData">确定</Button>-->
      </div>
    </Modal>

  </div>
</template>

<script>
  import listMixin from '../../mixin/list'
  import pageList from '../../template/listTemplate'
  import pageButton from '../../template/pageBtnTemplate'
  import confirmDialog from '../../template/confirmDialogTemplate'
  export default {
    mixins:[listMixin],
    components: {
      pageList,
      pageButton,
      confirmDialog
    },
    methods:{
      //开始时间
      clearBeginTime(e){
        this.params.clearBeginTime = e;
      },
      //结束时间
      clearEndTime(e){
        this.params.clearEndTime = e;
      },
      change(name){
        if(name == 'name3'){
          this.record.pageCurrent = 1;
          console.log(this.recordData,'this.recordData')
          this.getRecordMan(this.record.pageCurrent);
        }else if(name == 'name2'){
          this.link.pageCurrent = 1;
          this.getLinkMan(this.link.pageCurrent);
        }
      },
      initData(){
        this.linkTab = 'name1';
        this.link.pageCurrent = 1;
        this.record.pageCurrent = 1;
      },
      changeRecordNum(value){
        this.record.pageCurrent = value;
        this.getRecordMan(this.record.pageCurrent);
      },
      getRecordMan(pageCurrent){
        this.$post('/bkmoxieyysorigincalls/list',{pageCurrent:pageCurrent,userId:this.user_id})
          .then((res) => {
            if(res.code === 0){
              this.recordData = res.data.pageListData;
              this.recordTotal = res.data.resultCount;
            }
          }, (err) => {
            console.log(err);
          })
      },
      changeLinkNum(value){
        this.link.pageCurrent = value;
        this.getLinkMan(this.link.pageCurrent);
      },
      getLinkMan(pageCurrent){
        this.$post('/bkuserlinkman/list',{pageCurrent:pageCurrent,userId:this.user_id})
          .then((res) => {
            if(res.code === 0){
              this.linkData = res.data.pageListData;
              this.linkTotal = res.data.resultCount;
            }
          }, (err) => {
            console.log(err);
          })
      },
      getLink(id){
        this.$post('/user/customer/info',{
          id:id
        })
          .then((res) => {
            if(res.code === 0){
              const data = res.data;
              this.basicInfo.realname = data.realname; //基本信息
              this.basicInfo.phone = data.phone;
              let idCard = data.detailMap.userIdc.idc ? data.detailMap.userIdc.idc : "";
              let xing = '';
              for(let i=0;i<idCard.length-4;i++){
                xing += '*';
              }
              this.icard = idCard? (xing + idCard.substr(idCard.length-4)):'';
              this.basicInfo.idc = data.detailMap.userIdc.idc ? data.detailMap.userIdc.idc : "";
              this.basicInfo.idcFrontImg = data.detailMap.userIdc.idcFrontImg ? data.detailMap.userIdc.idcFrontImg : "";
              this.basicInfo.idcBacImg = data.detailMap.userIdc.idcBacImg ? data.detailMap.userIdc.idcBacImg : "";

              this.otherInfo = data.detailMap.userBasice; //其他信息
              this.otherInfo.workType = this.getType(this.otherInfo.workType,'work');

              this.linkman = data.detailMap.userBasice; //联系人
              this.linkman.relation = this.getType(this.linkman.relation,'relation');
              this.linkman.relationOne = this.getType(this.linkman.relationOne,'relation');

              this.bankCard = data.detailMap.userBankList[0] ? data.detailMap.userBankList[0] : {};
              let bankNum = this.bankCard.bankNum;
              let bankCardXing = '';
              for(let i=0;i<bankNum.length-4;i++){
                bankCardXing += '*';
              }

              this.bankCard.bankNum = bankCardXing + bankNum.substr(bankNum.length-4);//银行卡
              this.bankCard.createTime = this.bankCard.createTime ? this.getLocalTime(this.bankCard.createTime) : '';

            }
          }, (err) => {
            console.log(err);
          })
      },
      getCollectionLog(id){
        this.$post('/bkcollectionlog/list',{
          collectionId:id
        })
          .then((res) => {
            if(res.code === 0){
              this.CollectionLog = res.data;
            }
          }, (err) => {
            console.log(err);
          })
      },
      number(){
        this.params.daysStr=this.params.daysStr.replace(/[^\.\d]/g,'');
        this.params.daysStr=this.params.daysStr.replace('.','');
      },
      reback(id){
        if(id){
          this.$Modal.confirm({
            title: '提示',
            content: `<p>确定要强制收回吗?</p>`,
            onOk: () => {
              this.compulsionRecovery(id)
            },
            onCancel: () => {
            }
          });

        }else{
          this.$Message.error(`请勾选需要收回订单！`);

        }
      },
      compulsionRecovery(nidsStr){
        this.$post('/bkcollection/compulsionRecovery',{nidsStr:nidsStr})
          .then((res) => {
            if(res.code === 0){
              this.$Message.success(`收回成功`);
              this.getList(this.url)
              // console.log( this.channelCodeList,'channel')
              // this.sysUserList = res.data.pageListData;
            }else{
              // this.$Message.error(res.msg);
            }
          }, (err) => {
            this.loading = false;
            console.log(err);
          })
      },
      getsysUserList(){
        this.$post('/sysUser/collection/list',{fb1:2})
          .then((res) => {
            if(res.code === 0){
              // console.log( this.channelCodeList,'channel')
              this.sysUserList = res.data;
            }else{
              // this.$Message.error(res.msg);
            }
          }, (err) => {
            this.loading = false;
            console.log(err);
          })
      },
      test(type){
        let url = '';
        if(type == 1){
          url = '../../../openapi/1.0/base/task/overdue/fee'
        }else if(type == 2){
          url = '../../../openapi/1.0/base/task/overdue/order'
        }else {
          url = '../../../openapi/1.0/base/task/overdue/create'
        }
        this.$post(url,{
          password : this.$md5('123456')
        }).then(res => {
          console.log(res,'cuishou');
        })
      }
    },
    data () {
      return {
        linkTab:'',
        recordDataHas:false,
        linkDataHas:false,
        recordTotal:0,
        linkTotal:0,
        icard:'',
        rebackTitle:[
          {
            title:'时间',
            key:'',
            minWidth:50,
            align:'center'
          },
          {
            title:'当前催收人员',
            key:'',
            minWidth:50,
            align:'center'
          },
          {
            title:'催收手机号',
            key:'',
            minWidth:50,
            align:'center'
          },
          {
            title:'催收反馈类型',
            key:'',
            minWidth:50,
            align:'center'
          },
          {
            title:'催收内容',
            key:'',
            minWidth:50,
            align:'center'
          },
          {
            title:'通话次数',
            key:'',
            minWidth:50,
            align:'center'
          },
          {
            title:'通话时长',
            key:'',
            minWidth:50,
            align:'center'
          }
        ],
        rebackData:[],
        isOrderTitle:[
          {
            title:'时间',
            key:'',
            width:140,
            align:'center'
          },
          {
            title:'操作内容',
            key:'',
            align:'left'
          }
        ],
        isOrderData:[],
        taobaoTitle:[
          {
            title:'收货人姓名',
            key:'name',
            minWidth:50,
          },
          {
            title:'使用次数',
            key:'count',
            minWidth:40,
            align:'center'

          },
          {
            title:'手机号',
            key:'phone',
            minWidth:40,
            align:'center'

          },
          {
            title:'收货地址',
            key:'address',
            minWidth:80
          },

        ],
        taobaoData:[
          {
            name:'小仙女慧慧',
            count:10,
            phone:'13389078908',
            address:'浙江省杭州市余杭区福鼎家园19幢1单元501'
          },
          {
            name:'小美女慧慧',
            count:10,
            phone:'13389078908',
            address:'浙江省杭州市西湖区余杭塘路与崇信路交叉口蒋村西溪人家5-1508'
          }
        ],
        familyTitle:[
          {
            title:'亲情号',
            minWidth:50,
            key:'familyNumber',
            align:'center'
          },
          {
            title:'手机号',
            key:'phone',
            minWidth:50,
            align:'center'
          },
          {
            title:'关系',
            key:'connect',
            minWidth:50,
            align:'center'
          }
        ],
        familyData:[
          {
            familyNumber:123,
            phone:18079808908,
            connect:'伴侣'
          }
        ],
        linkTitle:[
          {
            title:'姓名',
            key:'name'
          },
          {
            title:'手机号',
            key:'mobile'
          }
        ],
        linkData:[],
        recordData:[],
        recordTitle:[

          {
            title:'姓名',
            key:'name',
            minWidth:30,
            render: (h,params) =>{
              return h('div',params.row.name ? params.row.name : '未知')
            }
          },
          {
            title:'手机号',
            key:'peerNumber',
            minWidth:20
          },
          {
            title:'通话时长(s)',
            key:'duration',
            minWidth:25
          },
          {
            title:'总通话次数',
            key:'callCount',
            minWidth:25
          },
          {
            title:'最近一次通话时间',
            key:'billMonth',
            minWidth:50
          }
        ],

        collectionId:'',
        collectionUserId:'',
        CollectionLog:[],
        link: {
          //status:'',
          pageCurrent: 1,
          pageLimit: 10
        },
        record: {
          //status:'',
          pageCurrent: 1,
          pageLimit: 10
        },
        showModal:{
          isShow:false,
          editShow:false,
          isLinkShow:false,
          rebackShow:false,
          isOrderShow:false,
        },
        CollectionLogTitle:[
          {
            title: '时间',
            align:'center',
            width:130,
            key:'createTime',
            render: (h, params) => {
              return h('div',this.getLocalTime(params.row.createTime))
            }
          },
          {
            title: '催收人员',
            align:'left',
            key:'remark',
          },
          {
            title: '反馈类型',
            align:'left',
            key:'remark',
          },
          {
            title: '反馈内容',
            align:'left',
            key:'remark',
          },
          {
            title: '备注',
            align:'left',
            key:'remark',
          },
        ],
        linkman: {},
        basicInfo: {},
        otherInfo: {},
        bankCard: {},
        sysUserList:[],
        daysStrList:[
          {value:'1',name:'1'},
          {value:'2',name:'2'},
          {value:'3',name:'3'},
          {value:'4',name:'4'},
          {value:'5',name:'5'},
          {value:'6',name:'6'},
          {value:'7',name:'7'},
          {value:'8',name:'8'},
          {value:'9',name:'9'},
          {value:'10',name:'10'},
          {value:'1_10',name:'1～10'},
          {value:'11_15',name:'11～15'},
          {value:'16_30',name:'16～30'},
          {value:'>30',name:'>30'}
        ],
        tag: {
          'title': '催收列表',
          'path': '/work/urge/list'
        },
        sysUser:[],
        user_id:'',
        statusList:[
          {
            id: 0,
            name:'未分配'
          },
          {
            id: 1,
            name: '已分配'
          }
        ],
        listTitle: [
          /*{
            type: 'selection',
            width:40,
            align:'center'
          },*/
          {
            title: '订单号',
            minWidth: 120,
            key: 'nid',
            align:'left',
          },
          {
            title: '用户姓名',
            key: 'realname',
            minWidth:80,
            align:'center'
          },
          {
            title: '手机号',
            key: 'phone',
            minWidth:80,
            align:'center',
            render: (h, params) => {
              let phone = params.row.phone;
              return h('div', phone?`${phone.substr(0,3)}****${phone.substr(7)}`:'—')
            }
          },
          {
            title: '借款信息',
            key: 'loanDay',
            minWidth:120,
            align:'center',
            render: (h, params) => {
              return h('div', `${this.toYuan(params.row.loanMoney)}（${params.row.loanDay}天）`)
            }
          },
        /*  {
            title: '借款金额(元)',
            key: 'loanMoney',
            minWidth:60,
            align:'center',
            render: (h, params) => {
              return h('div', this.toYuan(params.row.loanMoney))
            }
          },*/
          /*{
            title: '应还金额(元)',
            key: 'deptNeedRepayment',
            minWidth:60,
            align:'center',
            render: (h, params) => {
              return h('div', this.toYuan(params.row.deptNeedRepayment))
            }
          },*/
         /* {
            title: '应还本金(元)',
            key: 'realMoney',
            minWidth:110,
            align:'center',
            render: (h, params) => {
              return h('div', this.toYuan(params.row.realMoney))
            }
          },*/
          {
            title: '逾期费用(元)',
            key: 'deptOverdueAmount',
            minWidth:60,
            align:'center',
            render: (h, params) => {
              return h('div', this.toYuan(params.row.deptOverdueAmount))
            }
          },
          {
            title: '已还金额(元)',
            key: '60',
            minWidth:110,
            align:'center',
            render: (h, params) => {
              return h('div', this.toYuan(params.row.deptRepaymentMoney))
            }
          },
          {
            title: '逾期天数',
            key: 'deptDays',
            minWidth:60,
            align:'center'
          },
          {
            title: '结清状态',
            key: 'settleStatus',
            minWidth:60,
            align:'center',
            render: (h, params) => {// 审核状态 0审核中，1通过，2拒绝 ，3电核
              let d = {};
              switch (params.row.settleStatus){
                case 0:
                  d.txt = '未结清';
                  d.color = '#f90';
                  break;
                case 1:
                  d.txt = '已结清';
                  d.color = '#19be6b';
                  break;

              }
              return h('div', {
                props: {},
                style:{
                  color:d.color
                }
              }, d.txt)
            },
          },
         /* {
            title: '催回金额(元)',
            key: 'collectionMoney',
            minWidth:60,
            align:'center',
            render: (h, params) => {
              return h('div', this.toYuan(params.row.collectionMoney))
            }
          },*/
          {
            title: '合同开始时间',
            key: 'borrowTime',
            minWidth:140,
            align:'center',
            render: (h, params) => {
              return h('div',this.getLocalTime(params.row.borrowTime))
            }
          },/*
          {
            title: '合同结束时间',
            key: 'repayTime',
            minWidth:140,
            align:'center',
            render: (h, params) => {
              return h('div',this.getLocalTime(params.row.repayTime))
            }
          },*/
          {
            title: '还款时间',
            key: 'clearTime',
            minWidth:140,
            align:'center',
            render: (h, params) => {
              return h('div',this.getLocalTime(params.row.clearTime))
            }
          },
          {
            title: '催收人员',
            key: 'collectionUserName',
            minWidth:80,
            align:'center',
            render: (h, params) => {
              return h('div',params.row.collectionUserName?params.row.collectionUserName:'—')
            }
          },/*
          {
            title: '催收状态',
            key: 'allotStatus',
            minWidth:70,
            align:'center',
            render: (h, params) => {// 审核状态 0审核中，1通过，2拒绝 ，3电核
              let d = {};
              switch (params.row.allotStatus){
                case 0:
                  d.txt = `${params.row.collectionUserName}:催收中`;
                  break;
                case 1:
                  d.txt = `${params.row.collectionUserName}:催收回收`;
                  break;
              }
              switch (params.row.settleStatus){
                case 0:
                  d.color = '#f90';
                  break;
                case 1:
                  d.color = '#19be6b';
                  break;
              }
                return h('div', {
                props: {},
                style:{
                  color:d.color
                }
              }, d.txt)
            },
          },*/
          {
            title: '操作',
            key: 'action',
            align:'center',
            width: 180,
            /*render: (h, params) => {
              let disabled = false;
              if(params.row.settleStatus == 1){
                disabled = true;
              }
              if(params.row.allotStatus == 1){
                disabled = true;
              }

              return h('div', [
                /!*h('Button', {
                  props: {
                    type: 'info',
                    size: 'small',
                    disabled:disabled

                  },
                  attr:{
                  },
                  style: {
                    marginRight: '5px'
                  },
                  on: {
                    click: () => {
                      this.reback(params.row.nid)
                    }
                  }
                }, '强制收回'),*!/
                h('Button', {
                  props: {
                    type: 'info',
                    size: 'small'
                  },
                  style: {
                    marginRight: '5px'
                  },
                  on: {
                    click: () => {
                      this.initData();
                      this.showModal.isLinkShow = true;
                      this.user_id = params.row.userId;
                      this.getLink(params.row.userId);
                      // this.getRecordMan(1);
                      // this.getLinkMan(1);
                    }
                  }
                }, '查看用户详情'),
                h('Button', {
                  props: {
                    type: 'info',
                    size: 'small'
                  },
                  style: {
                    marginRight: '5px'
                  },
                  on: {
                    click: () => {
                      this.showModal.isShow = true;
                      this.getCollectionLog(params.row.id);
                    }
                  }
                }, '查看催记'),
              ]);
            }*/
            render: (h,params) => {
              return h('div',[
                h('Button',{
                  props: {
                    type: 'info',
                    size: 'small'
                  },
                  style: {
                    marginRight: '5px'
                  },
                  on: {
                    click: () => {
                      this.showModal.rebackShow = true;
                      //this.getCollectionLog(params.row.id);
                    }
                  }
                },'客户反馈'),
                h('Button',{
                  props: {
                    type: 'info',
                    size: 'small'
                  },
                  style: {
                    marginRight: '5px'
                  },
                  on: {
                    click: () => {
                      this.showModal.isOrderShow = true;
                      //this.getCollectionLog(params.row.id);
                    }
                  }
                },'订单流程')
              ])
            }
          },
        ],
        url: '/bkcollection/list',
        nameListUrl: '',
        params: {
          //status:'',
          pageCurrent: 1,
          pageLimit: 10
        },

      }
    },
    created(){
      this.getsysUserList();
    }
  }
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
  .list-btn{
    margin-bottom: 5px;
    margin-right: 5px;
    display: inline-block;
  }
  .refresh-btn{
    float: right;
  }
  /deep/ .ivu-table-cell{
    padding-left: 5px;
    padding-right: 5px;
  }
  .width30 {
       width: 40%;
       display: inline-block;
       margin-bottom: 5px;
     }

</style>
